package com.music.service.songs.constants;

public class SongSQLQueries {
		public static final String ADD_NEW_SONG = 
			"insert into songs(created_member_id,song_name,state,creation_date,last_update_date)" +
			"values (?,?,?,sysdate,sysdate)";
		
		public static final String DELETE_SONG =
			"update songs set state = ? where song_id = ? && created_member_id = ? && state != ?";
		
		public static final String EDIT_SONG_NAME =
			"udpate songs set song_name=? where song_id=? && created_member_id=? && state = ?";
		
		public final static String CHECK_SONG_PERMISSION = 
			"select count(*) as count from songs where song_id=? && created_member_id=? && state=?";
		
		public final static String VIEW_SONGS =
			"select song_id,song_name,created_member_id,state,composer_id,creation_date,last_update_date" +
			" from songs where song_id in (?) && state != ?";
		
		public final static String SET_PREFERRED_URL_FOR_SONG_FOR_MEMBER =
			"update song_urls_r set url_id = ? where song_id = ? && created_member_id = ?";
		
		public final static String GET_SONGS_FROM_PLAYLIST_ID =
			"select a.song_id,a.song_name,a.created_member_id,a.state,a.composer_id,a.creation_date," +
			"a.last_update_date from songs a,playlist_songs_r b where b.playlist_id = ? && a.state != ? " +
			"&& b.song_id = a.song_id ";
}